AudioStreamCallbackImpl
class AudioStreamCallbackImpl(onAudioReadyBlock: (buffer: FloatArray, numFrames: Int) -> Int) : AudioStreamCallback
Concrete implementation of AudioStreamCallback that delegates to a lambda.
This class exists to provide a Swift-friendly way to create callback instances, since Swift cannot directly create anonymous implementations of Kotlin interfaces.
Usage from Swift:
let callback = AudioStreamCallbackImpl { buffer, numFrames in
// Fill buffer with audio data
return numFrames
}Content copied to clipboard
Functions
Link copied to clipboard
Called when the audio stream needs data (output) or has data available (input).
Link copied to clipboard
Called when an unrecoverable error occurs on the stream.
Link copied to clipboard
Called when the stream's lifecycle state changes.
Link copied to clipboard
Called when an audio underrun (output) or overrun (input) is detected.